<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>core-plugins</artifactId>
        <groupId>com.jerei</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>${pluginId}</artifactId>

    <version>0.0.1-SNAPSHOT</version>

    <properties>
        <plugin.id>${pluginId}</plugin.id>
        <plugin.class>com.jerei.plugin.init.InitPlugin</plugin.class>
        <plugin.version>0.0.1</plugin.version>
        <plugin.provider>auto</plugin.provider>
        <plugin.dependencies/>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <id>unzip jar file</id>
                        <phase>package</phase>
                        <configuration>
                            <target>
                                <unzip src="target/${r'${project.artifactId}'}-${r'${project.version}'}.${r'${project.packaging}'}"
                                       dest="target/plugin-classes"/>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <descriptors>
                        <descriptor>
                            src/main/assembly/assembly.xml
                        </descriptor>
                    </descriptors>
                    <appendAssemblyId>false</appendAssemblyId>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Plugin-Id>${r'${plugin.id}'}</Plugin-Id>
                            <Plugin-Class>${r'${plugin.class}'}</Plugin-Class>
                            <Plugin-Version>${r'${plugin.version}'}</Plugin-Version>
                            <Plugin-Provider>${r'${plugin.provider}'}</Plugin-Provider>
                            <Plugin-Dependencies>${r'${plugin.dependencies}'}</Plugin-Dependencies>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${r'${junit.version}'}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jerei</groupId>
            <artifactId>core-web-util</artifactId>
            <version>${r'${parent.version}'}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

</project>